using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._TransitFeed
{
    /// <summary>
    /// <para>GTFS To Network Dataset Transit Sources</para>
    /// <para>Converts one or more General Transit Feed Specification (GTFS) public transit datasets to a set of feature classes and tables that can be used when creating a network dataset. The output feature classes and tables represent the transit stops, lines, and schedules in the format defined by the Network Analyst public transit data model, which can be interpreted by the Public Transit evaluator in a network dataset.</para>
    /// <para>将一个或多个通用公交馈送规范 （GTFS） 公共交通数据集转换为一组要素类和表，以便在创建网络数据集时使用。输出要素类和表以 Network Analyst 公共交通数据模型定义的格式表示公交站点、线路和时间表，公共交通评估器可在网络数据集中解释这些格式。</para>
    /// </summary>    
    [DisplayName("GTFS To Network Dataset Transit Sources")]
    public class GTFSToNetworkDatasetTransitSources : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GTFSToNetworkDatasetTransitSources()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_gtfs_folders">
        /// <para>Input GTFS Folders</para>
        /// <para>One or more folders containing valid GTFS data. Each folder must contain the GTFS stops.txt, routes.txt, trips.txt, and stop_times.txt files and either the calendar.txt or calendar_dates.txt file, or both.</para>
        /// <para>包含有效 GTFS 数据的一个或多个文件夹。每个文件夹必须包含 GTFS stops.txt、routes.txt、trips.txt 和 stop_times.txt 文件以及 calendar.txt 或 calendar_dates.txt 文件，或两者兼而有之。</para>
        /// </param>
        /// <param name="_target_feature_dataset">
        /// <para>Target Feature Dataset</para>
        /// <para><xdoc>
        ///   <para>The feature dataset where the transit-enabled network dataset will be created. The Stops and LineVariantElements feature classes created by this tool will be placed in this feature dataset, and the output tables created by this tool will be placed in this feature dataset's parent geodatabase.</para>
        ///   <para>The feature dataset can be in a file geodatabase or an enterprise geodatabase and can have any spatial reference. If the target feature dataset is in an enterprise geodatabase, it must not be versioned. Do not include the target feature dataset in a geodatabase with an existing feature dataset containing public transit data model feature classes.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其中创建启用公交的网络数据集的要素数据集。此工具创建的 Stops 和 LineVariantElements 要素类将放置在此要素数据集中，而此工具创建的输出表将放置在此要素数据集的父地理数据库中。</para>
        ///   <para>要素数据集可以位于文件地理数据库或企业级地理数据库中，并且可以具有任何空间参考。如果目标要素数据集位于企业级地理数据库中，则不得对其进行版本化。不要将目标要素数据集包含在包含公共交通数据模型要素类的现有要素数据集的地理数据库中。</para>
        /// </xdoc></para>
        /// </param>
        public GTFSToNetworkDatasetTransitSources(List<object> _in_gtfs_folders, object _target_feature_dataset)
        {
            this._in_gtfs_folders = _in_gtfs_folders;
            this._target_feature_dataset = _target_feature_dataset;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "GTFS To Network Dataset Transit Sources";

        public override string CallName => "conversion.GTFSToNetworkDatasetTransitSources";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_gtfs_folders, _target_feature_dataset, _updated_target_feature_dataset, _output_stops, _output_line_variant_elements, _output_calendars, _output_calendar_exceptions, _output_lines, _output_line_variants, _output_runs, _output_schedule_elements, _output_schedules, _interpolate.GetGPValue(), _append.GetGPValue()];

        /// <summary>
        /// <para>Input GTFS Folders</para>
        /// <para>One or more folders containing valid GTFS data. Each folder must contain the GTFS stops.txt, routes.txt, trips.txt, and stop_times.txt files and either the calendar.txt or calendar_dates.txt file, or both.</para>
        /// <para>包含有效 GTFS 数据的一个或多个文件夹。每个文件夹必须包含 GTFS stops.txt、routes.txt、trips.txt 和 stop_times.txt 文件以及 calendar.txt 或 calendar_dates.txt 文件，或两者兼而有之。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input GTFS Folders")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_gtfs_folders { get; set; }


        /// <summary>
        /// <para>Target Feature Dataset</para>
        /// <para><xdoc>
        ///   <para>The feature dataset where the transit-enabled network dataset will be created. The Stops and LineVariantElements feature classes created by this tool will be placed in this feature dataset, and the output tables created by this tool will be placed in this feature dataset's parent geodatabase.</para>
        ///   <para>The feature dataset can be in a file geodatabase or an enterprise geodatabase and can have any spatial reference. If the target feature dataset is in an enterprise geodatabase, it must not be versioned. Do not include the target feature dataset in a geodatabase with an existing feature dataset containing public transit data model feature classes.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在其中创建启用公交的网络数据集的要素数据集。此工具创建的 Stops 和 LineVariantElements 要素类将放置在此要素数据集中，而此工具创建的输出表将放置在此要素数据集的父地理数据库中。</para>
        ///   <para>要素数据集可以位于文件地理数据库或企业级地理数据库中，并且可以具有任何空间参考。如果目标要素数据集位于企业级地理数据库中，则不得对其进行版本化。不要将目标要素数据集包含在包含公共交通数据模型要素类的现有要素数据集的地理数据库中。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_feature_dataset { get; set; }


        /// <summary>
        /// <para>Updated Target Feature Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Target Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_target_feature_dataset { get; set; }


        /// <summary>
        /// <para>Output Stops</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Stops")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_stops { get; set; }


        /// <summary>
        /// <para>Output Line Variant Elements</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Line Variant Elements")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_line_variant_elements { get; set; }


        /// <summary>
        /// <para>Output Calendars</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Calendars")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_calendars { get; set; }


        /// <summary>
        /// <para>Output Calendar Exceptions</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Calendar Exceptions")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_calendar_exceptions { get; set; }


        /// <summary>
        /// <para>Output Lines</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Lines")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_lines { get; set; }


        /// <summary>
        /// <para>Output Line Variants</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Line Variants")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_line_variants { get; set; }


        /// <summary>
        /// <para>Output Runs</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Runs")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_runs { get; set; }


        /// <summary>
        /// <para>Output Schedule Elements</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Schedule Elements")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_schedule_elements { get; set; }


        /// <summary>
        /// <para>Output Schedules</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Schedules")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_schedules { get; set; }


        /// <summary>
        /// <para>Interpolate blank stop times</para>
        /// <para><xdoc>
        ///   <para>Specifies whether blank values from the arrival_time and departure_time fields in the GTFS stop_times.txt file will be interpolated when creating the public transit data model tables.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Blank values will be interpolated using simple linear interpolation. The original GTFS data will not be altered. If there are no blank values in the original data, no interpolation will occur.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Blank values will not be interpolated. If blank values are found in the input GTFS data, the tool will issue a warning and will not process the GTFS dataset. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在创建公共交通数据模型表时是否插值 GTFS stop_times.txt 文件中的 arrival_time 和 departure_time 字段中的空白值。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 空白值将使用简单的线性插值进行插值。原始 GTFS 数据不会被更改。如果原始数据中没有空白值，则不会发生插值。</bullet_item><para/>
        ///     <bullet_item>未选中 - 空白值将不插值。如果在输入 GTFS 数据中找到空白值，则该工具将发出警告，并且不会处理 GTFS 数据集。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolate blank stop times")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _interpolate_value _interpolate { get; set; } = _interpolate_value._false;

        public enum _interpolate_value
        {
            /// <summary>
            /// <para>INTERPOLATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INTERPOLATE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_INTERPOLATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_INTERPOLATE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Append to existing tables</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input GTFS datasets will be appended to existing public transit data model feature classes and tables in the target feature dataset and its parent geodatabase.</para>
        ///   <para>This parameter will be hidden if the target feature dataset and its parent geodatabase do not contain existing public transit data model feature classes and tables.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Data will be appended to the existing feature classes and tables.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Existing feature classes and tables will be overwritten. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将输入 GTFS 数据集追加到目标要素数据集及其父地理数据库中的现有公共交通数据模型要素类和表。</para>
        ///   <para>如果目标要素数据集及其父地理数据库不包含现有的公共交通数据模型要素类和表，则此参数将被隐藏。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 数据将追加到现有要素类和表中。</bullet_item><para/>
        ///     <bullet_item>未选中 - 现有要素类和表将被覆盖。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append to existing tables")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _append_value _append { get; set; } = _append_value._false;

        public enum _append_value
        {
            /// <summary>
            /// <para>APPEND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("APPEND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_APPEND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_APPEND")]
            [GPEnumValue("false")]
            _false,

        }

        public GTFSToNetworkDatasetTransitSources SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}